import {legacy_createStore as createStore,combineReducers,applyMiddleware,compose} from 'redux';
// 引入用户reducer
import userReducer from './reducer/userReducer';
// 引入中间件
import ReduxThunk from 'redux-thunk';
// 引入navreducer
import navReducer from './reducer/navReducer'
let reduxcer = combineReducers({
    userReducer,
    navReducer
})
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
// 创建仓库
let store = createStore(reduxcer,composeEnhancers(applyMiddleware(ReduxThunk)));

export default store;